<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
    <link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
    <link rel="shortcut icon" type="image/png" href="..&#x2F;assets/PreloadJS_16x16.png">
    <script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
	<title>PreloadJS v0.3.0 API Documentation : PreloadJS</title>  
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
            
                <h1><a href="http:&#x2F;&#x2F;www.createjs.com&#x2F;#!&#x2F;PreloadJS"><img src="http:&#x2F;&#x2F;createjs.com&#x2F;resources&#x2F;SuiteIcons&#x2F;PreloadJS&#x2F;docs-icon-PreloadJS.png" title="PreloadJS"></a></h1>
            
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Documentation for: 0.3.0</em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
    <h2 class="off-left">APIs</h2>
    <div id="api-tabview" class="tabview">
        <ul class="tabs">
            <li><a href="#api-classes">Classes</a></li>
        </ul>

        <div id="api-tabview-filter">
            <input type="search" id="api-filter" placeholder="Type to filter APIs">
        </div>

        <div id="api-tabview-panel">
            <ul id="api-classes" class="apis classes">
            
                <li><a href="..&#x2F;classes/AbstractLoader.html">AbstractLoader</a></li>
            
                <li><a href="..&#x2F;classes/EventDispatcher.html">EventDispatcher</a></li>
            
                <li><a href="..&#x2F;classes/LoadQueue.html">LoadQueue</a></li>
            
                <li><a href="..&#x2F;classes/PreloadJS.html">PreloadJS</a></li>
            
                <li><a href="..&#x2F;classes/TagLoader.html">TagLoader</a></li>
            
                <li><a href="..&#x2F;classes/XHRLoader.html">XHRLoader</a></li>
            
            </ul>

            <ul id="api-modules" class="apis modules">
            
                <li><a href="..&#x2F;modules/PreloadJS.html">PreloadJS</a></li>
            
            </ul>
        </div>
    </div>
</div>

            </div>
        </div>
        <div class="yui3-u-3-4">
            <div id="api-options">
        Show:
        <label for="api-show-inherited">
            <input type="checkbox" id="api-show-inherited" checked>
            Inherited
        </label>

        <label for="api-show-protected">
            <input type="checkbox" id="api-show-protected">
            Protected
        </label>

        <label for="api-show-private">
            <input type="checkbox" id="api-show-private">
            Private
        </label>
        <label for="api-show-deprecated">
            <input type="checkbox" id="api-show-deprecated">
            Deprecated
        </label>

    </div>
            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
                        <h1>PreloadJS Module</h1>
<div class="box clearfix meta">
    

    

    
        <div class="foundat">
            Defined in: <a href="..&#x2F;files&#x2F;.._src_preloadjs_version.js.html#l3"><code>PreloadJS:3</code></a>
        </div>
    

    
</div>



<div class="box intro">
    <p>PreloadJS provides a consistent way to preload content for use in HTML applications. Preloading can be done using
HTML tags, as well as XHR.</p>

<p>By default, PreloadJS will try and load content using XHR, since it provides better support for progress and
completion events, <b>however due to cross-domain issues, it may still be preferable to use tag-based loading
instead</b>. Note that some content requires XHR to work (plain text, web audio), and some requires tags (HTML audio).
Note this is handled automatically where possible.</p>

<p>PreloadJS currently supports all modern browsers, and we have done our best to include support for most older
browsers. If you find an issue with any specific OS/browser combination, please visit http://community.createjs.com/
and report it.</p>

<h4>Getting Started</h4>

<p>To get started, check out the <a href="../classes/LoadQueue.html" class="crosslink">LoadQueue</a> class, which includes a quick overview of how
to load files and process results.</p>

<h4>Example</h4>

<pre class="code prettyprint"><code> var queue = new createjs.LoadQueue();
 queue.installPlugin(createjs.Sound);
 queue.addEventListener("complete", handleComplete);
 queue.loadFile({id:"sound", src:"http://path/to/sound.mp3"});
 queue.loadManifest([
     {id: "myImage", src:"path/to/myImage.jpg"}
 ]);
 function handleComplete() {
     createjs.Sound.play("sound");
     var image = queue.getResult("myImage");
     document.body.appendChild(image);
 }
</code></pre>

<p><b>Important note on plugins:</b> Plugins must be installed <i>before</i> items are added to the queue, otherwise
they will not be processed, even if the load has not actually kicked off yet. Plugin functionality is handled when
the items are added to the LoadQueue.</p>
</div>



<div class="yui3-g">
    <div class="yui3-u-1-2">
        
            <p>This module provides the following classes:</p>

            <ul class="module-classes">
            
                <li class="module-class">
                    <a href="..&#x2F;classes/AbstractLoader.html">
                        AbstractLoader
                    </a>
                </li>
            
                <li class="module-class">
                    <a href="..&#x2F;classes/EventDispatcher.html">
                        EventDispatcher
                    </a>
                </li>
            
                <li class="module-class">
                    <a href="..&#x2F;classes/LoadQueue.html">
                        LoadQueue
                    </a>
                </li>
            
                <li class="module-class">
                    <a href="..&#x2F;classes/PreloadJS.html">
                        PreloadJS
                    </a>
                </li>
            
                <li class="module-class">
                    <a href="..&#x2F;classes/TagLoader.html">
                        TagLoader
                    </a>
                </li>
            
                <li class="module-class">
                    <a href="..&#x2F;classes/XHRLoader.html">
                        XHRLoader
                    </a>
                </li>
            
            </ul>
        
    </div>

    <div class="yui3-u-1-2">
        
    </div>
</div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="..&#x2F;assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="..&#x2F;assets/js/yui-prettify.js"></script>
<script src="..&#x2F;assets/../api.js"></script>
<script src="..&#x2F;assets/js/api-filter.js"></script>
<script src="..&#x2F;assets/js/api-list.js"></script>
<script src="..&#x2F;assets/js/api-search.js"></script>
<script src="..&#x2F;assets/js/apidocs.js"></script>
</body>
</html>